#define _CRT_SECURE_NO_WARNINGS 1
#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <assert.h>

int my_strncmp(const char* arr1, const char* arr2 ,size_t num)
{
	assert(arr1 && arr2);
	while (num--)
	{
		if (*arr1 == *arr2)
		{
			arr1++;
			arr2++;
		}
		else
		{
			return *arr1 - *arr2;
		}
	}
	return 0;
}

int main()
{
	char arr1[] = "abc";
	char arr2[] = "bbcd";
	int ret = my_strncmp(arr1, arr2,1);
	printf("%d", ret);
	return 0;
}